//*************************************************************************
//  PP2_10.java   Author: Tang caiming
//
//  Determine the total face value of the silver coin in the piggy bank
//  and divide it into dollars and cents in dollars.
//*************************************************************************

import java.util.Scanner;

public class PP2_10
{
   public static void main(String[] args)
   {
      final int penny,nickle,dime,quarter,dols;   // 1/5/10/25

      int dollars,quantity1,quantity2,quantity3,quantity4,sum,cent;

      Scanner scan = new Scanner(System.in);

      penny = 1;
      nickle = 5;
      dime = 10;
      quarter = 25;
      dols = 100;
     
      System.out.println("please input the number of quarter:");
      quantity1 = scan.nextInt();

      System.out.println("please input the number of dime:");
      quantity2= scan.nextInt();

      System.out.println("please input the number of nickle:");
      quantity3 = scan.nextInt();

      System.out.println("please input the number of penny:");
      quantity4 = scan.nextInt();

      sum = quantity1 * quarter + quantity2 * dime + quantity3 * nickle + quantity4 * penny;
      dollars = sum / dols;
      cent = quantity1 * quarter + quantity2 * dime + quantity3 * nickle + quantity4 * penny - dollars * dols;
      System.out.println(dollars + "美元" + cent + "美分");
   }
}

